<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/8 0008
 * Time: 下午 3:07
 */

namespace app\sports_admin\vaildate;


class DeviceTemporaryNum extends Base
{
    /**
     * 添加验证
     */
    public function insertTemporaryNumber()
    {
        $rule = [
            'num'=>'require|integer',
            'batch'=>'require|number|between:1,999',
            'version'=>'require|number|between:1,99',
            'version_number'=>'require|number|between:1,99',
        ];
        $msg = [
            'num'=>'请输入正确编号',
            'batch'=>'批次格式错误',
            'version'=>'版本格式错误',
            'version_number'=>'型号格式错误',
        ];
        self::goCheck($rule,$msg);
    }
    /**
     * 删除验证
     */
    public function deleteTemporaryNumber()
    {
        $rule = [
            'id'=>'require|array'
        ];
        $msg = [
            'id'=>'请选择要删除的设备编号'
        ];
        self::goCheck($rule,$msg);
    }
    /**
     * 弃用验证
     */
    public function abandoningTemporaryNumber()
    {
        $rule = [
            'id'=>'require|array'
        ];
        $msg = [
            'id'=>'请选择要弃用的设备编号'
        ];
        self::goCheck($rule,$msg);
    }
}